home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\INCLUDE\TERM.H < prev    next >
C/C++ Source or Header  |  1995-01-03  |  4KB  |  165 lines

  1. /*
  2.  * term.h: header file for term.c 
  3.  *
  4.  * Written By Michael Sandrof
  5.  *
  6.  * Copyright(c) 1990 
  7.  *
  8.  * See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT 
  9.  *
  10.  * @(#)$Id: term.h,v 1.9 1994/08/01 14:27:23 mrg Stab $
  11.  */
  12.  
  13. #ifndef _TERM_H_
  14. # define _TERM_H_
  15.  
  16. #ifdef MUNIX
  17. # include <sys/ttold.h>
  18. #endif
  19.  
  20. #ifdef _Windows
  21. #define    CO    term_get_columns()
  22. #define    LI    term_get_rows()
  23. #define    term_eight_bit()    (1)
  24. #define    set_term_eight_bit(x)    (0)
  25. #define    term_init()        (0)
  26.  
  27. #define    term_cont()        (0)
  28. #define    term_echo(x)        (0)
  29. #define    term_init()        (0)
  30. #define    term_putchar(x)        (0)
  31. #define    term_puts(x, y)        (0)
  32. #define    term_reset()        (0)
  33.  
  34. #define    term_cursor_left()    (0)
  35. #define    term_cursor_right()    (0)
  36. #define    term_insert(x)        (0)
  37.  
  38. int    term_pause();
  39.  
  40. #else
  41. extern    int    term_reset_flag;
  42. extern    char    *CM,
  43.         *DO,
  44.         *CE,
  45.         *CL,
  46.         *CR,
  47.         *NL,
  48.         *SO,
  49.         *SE,
  50.         *US,
  51.         *UE,
  52.         *MD,
  53.         *ME,
  54.         *BL;
  55. extern    int    CO,
  56.         LI,
  57.         SG;
  58.  
  59. extern    void    putchar_x();
  60.  
  61. #define tputs_x(s)        (tputs(s, 0, putchar_x))
  62.  
  63. #define term_underline_on()    (tputs_x(US))
  64. #define term_underline_off()    (tputs_x(UE))
  65. #define term_standout_on()    (tputs_x(SO))
  66. #define term_standout_off()    (tputs_x(SE))
  67. #define term_clear_screen()    (tputs_x(CL))
  68. #define term_move_cursor(c, r)    (tputs_x(tgoto(CM, (c), (r))))
  69. #define term_cr()        (tputs_x(CR))
  70. #define term_newline()        (tputs_x(NL))
  71. #define term_beep()        (tputs_x(BL),fflush(current_screen ? \
  72.                     current_screen->fpout : stdout))
  73. #define    term_bold_on()        (tputs_x(MD))
  74. #define    term_bold_off()        (tputs_x(ME))
  75.  
  76. extern    RETSIGTYPE    term_cont();
  77. extern    int    term_echo();
  78. extern    void    term_init();
  79. extern    int    term_resize();
  80. extern    void    term_pause();
  81. extern    void    term_putchar();
  82. extern    int    term_puts();
  83. extern    void    term_flush();
  84. extern    int    (*term_scroll)();
  85. extern    int    (*term_insert)();
  86. extern    int    (*term_delete)();
  87. extern    int    (*term_cursor_right)();
  88. extern    int    (*term_cursor_left)();
  89. extern    int    (*term_clear_to_eol)();
  90. extern    void    term_space_erase();
  91. extern    void    term_reset();
  92.  
  93. extern  void    copy_window_size();
  94. extern    int    term_eight_bit();
  95. extern    void    set_term_eight_bit __P((int));
  96.  
  97. #if defined(ISC22) || defined(MUNIX)
  98. /* Structure for terminal special characters */
  99. struct    tchars
  100. {
  101.     char    t_intrc;    /* Interrupt            */
  102.     char    t_quitc;    /* Quit             */
  103.     char    t_startc;    /* Start output         */
  104.     char    t_stopc;    /* Stop output            */
  105.     char    t_eofc;        /* End-of-file (EOF)        */
  106.     char    t_brkc;        /* Input delimiter (like nl)    */
  107. }
  108.  
  109. struct ltchars
  110. {
  111.     char    t_suspc;    /* stop process signal        */
  112.     char    t_dsuspc;    /* delayed stop process signal    */
  113.     char    t_rprntc;    /* reprint line            */
  114.     char    t_flushc;    /* flush output (toggles)    */
  115.     char    t_werasc;    /* word erase            */
  116.     char    t_lnextc;    /* literal next character    */
  117. };
  118. #endif /* ISC22 || MUNIX */
  119.  
  120. #if defined(_HPUX_SOURCE)
  121.  
  122. #ifndef _TTY_CHARS_ST_
  123. #define _TTY_CHARS_ST_
  124.  
  125. /* Structure for terminal special characters */
  126. struct tchars
  127. {
  128.     char    t_intrc;    /* Interrupt            */
  129.     char    t_quitc;    /* Quit             */
  130.     char    t_startc;    /* Start output         */
  131.     char    t_stopc;    /* Stop output            */
  132.     char    t_eofc;        /* End-of-file (EOF)        */
  133.     char    t_brkc;        /* Input delimiter (like nl)    */
  134. };
  135.  
  136. #endif /* _TTY_CHARS_ST_ */
  137.  
  138. #ifndef TIOCSETC
  139. # define TIOCSETC    _IOW('t', 17, struct tchars)    /* set special chars */
  140. #endif /* TIOCSETC */
  141.  
  142. #ifndef TIOCGETC
  143. # define TIOCGETC    _IOR('t', 18, struct tchars)    /* get special chars */
  144. #endif /* TIOCGETC */
  145.  
  146. #ifndef CBREAK
  147. # define CBREAK        0x02    /* Half-cooked mode */
  148. #endif /* CBREAK */
  149.  
  150. #ifndef SIGWINCH
  151. # define    SIGWINCH    SIGWINDOW
  152. #endif /* SIGWINCH */
  153.  
  154. #endif /* _HPUX_SOURCE */
  155.  
  156. /* well, it works */
  157. #ifdef mips
  158. # define fputc(c,f) write(1,&(c),1)
  159. # define fwrite(buffer,len,cnt,f) write(1,buffer,len)
  160. #endif /*mips*/
  161.  
  162. #endif _Windows
  163.  
  164. #endif /* _TERM_H_ */
  165.